projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ccfffb2
)
gtkpadcontroller: Avoid filling action list with empty elements
author
Carlos Garnacho
<carlosg@gnome.org>
Fri, 24 Apr 2020 20:21:08 +0000
(22:21 +0200)
committer
Carlos Garnacho
<carlosg@gnome.org>
Fri, 24 Apr 2020 20:21:08 +0000
(22:21 +0200)
We don't need to set the array size if we are adding elements afterwards.
gtk/gtkpadcontroller.c
patch
|
blob
|
history
diff --git
a/gtk/gtkpadcontroller.c
b/gtk/gtkpadcontroller.c
index 833bf423383abc41e538defb72029dbc1d2345d9..357670adc952cbd8dbf76b5593dbaaf548e78bd6 100644
(file)
--- a/
gtk/gtkpadcontroller.c
+++ b/
gtk/gtkpadcontroller.c
@@
-452,8
+452,6
@@
gtk_pad_controller_add_entry (GtkPadController *controller,
.action_name = g_strdup (entry->action_name)
};
- g_array_set_size (controller->action_entries, controller->action_entries->len + 1);
-
for (i = 0; i < controller->action_entries->len; i++)
{
if (entry_compare_func (&new_entry,